<?php

if (!defined('BASEPATH'))
	exit('No direct script access allowed');

class Welcome extends CI_Controller {

	public function index() {
		//Load language
		//you might want to just autoload these two helpers
		$this->load->library(array('table'));

		// load language file
		$this->lang->load('welcome');


		$data = array(
			'users' => array(
				array('id' => 1, 'name' => 'Jim'),
				array('id' => 2, 'name' => 'John'),
				array('id' => 3, 'name' => 'Bob'),
			)
		);

		$data = array(
			array('Name', 'Color', 'Size'),
			array('Fred', 'Blue', 'Small'),
			array('Mary', 'Red', 'Large'),
			array('John', 'Green', 'Medium')
		);
		$datat = $this->table->set_caption('Colors');
		$datat = $this->table->generate($data);

		$this->parser->show('welcome_message', array('data' => $datat,'title' => 'Title - Labas'));
		//$this->load->view('welcome_message');
	}

	public function test() {
		$this->load->view('headeris');
		$this->parser->ajax('testas',array('data' => $datat,'title' => 'Title - Labas'));
	}

}
